<?php

function view_profil($config,$param) {
    view_header_up($config,$param);
    //
    ?><title>Idebeda-Profil</title><?
    //
    view_header_bottom($config,$param);
    ?>
    <h2>Profil</h2>
    <script type="text/javascript">
		
	</script>
    <?
    if (isset($_SESSION['succ'])) {
        echo '<div class="success alert">'.$_SESSION['succ'].'</div>';
        unset($_SESSION['succ']);
    }
    $db =  new db($config);
	$result = $db->query("SELECT * FROM mn_crew WHERE idCrew = '".$_SESSION['logged']['id']."'");
    ?>
	<form action="" id="ffpesan" method="post">
	<ul>
		<li class="field">
			<label class="inline" for="uname">Username</label>
			<input class="normal text input" id="uname" name="uname" type="text" placeholder="username" value="<? echo $result[0]['username']; ?>" />
		</li>
		<li class="field">
			<label class="inline" for="pass">Password</label>
			<input class="normal text input" id="pass" autocomplete="off" name="pass" type="password" placeholder="" />
			<span class="warning label">*) kosongkan bila tak ingin merubah</span>
		</li>
		<li class="prepend field">
			<label class="inline" for="nohp">Nomor HP</label>
			<span class="adjoined">+62</span>
			<input class="narrow text input" id="nohp" name="nohp" type="text" placeholder="nomor hp" value="<? echo $result[0]['no_hape']; ?>" />
		</li>
		<li class="field">
			<label class="inline" for="email">Email</label>
			<input class="wide text input" id="email" name="email" type="text" placeholder="email" value="<? echo $result[0]['email']; ?>" />
		</li>
		<li class="prepend field">
			<label class="inline" for="nohp">Twitter</label>
			<span class="adjoined">@</span>
			<input class="normal text input" id="tw" name="tw" type="text" placeholder="akun twitter" value="<? echo $result[0]['twitter']; ?>" />
		</li>
		<div class="medium primary btn"><input type="submit" name="ubah" value="Ubah" /></div>
	</ul>
	</form>
<?
	view_footer($config,$param);
}

?>
